-content_for :widget_title do
  %strong Transactions
  for this
  -if system.is_biz_process
    Process
  -else
    System
  

-content_for :widget_help, 'system_transactions'

-content_for :widget_id, 'system_transactions_id'

-content_for :widget_buttons do
  .filter
    .row-fluid
      .span12
        .pull-right
          %a.btn.btn-add{ :href => new_flow_transaction_path('transaction[system_id]' => system.id), :'data-toggle' => 'modal-ajax-form', :'data-modal-reset' => 'reset', :'data-form-target' => 'refresh', :title => 'Create New Transaction' }
            %i.grcicon-add
            New

.description
  -#%script(type='text/html' data-title='' data-description='')
    %li(data-id='<%= id %>' data-toggle='collapse' data-target='#transaction-<%= id %>')
      .slot.singlecontrolSlot
        .expander
        %a.widgetbtn.fltrt{ :href => flow_transactions_path + '/<%= id %>/edit', :'data-toggle' => 'modal-ajax-form', :'data-modal-reset' => 'reset', :'data-form-target' => 'refresh' }
          %i.grcicon-edit
        %span.prefix <%= title %>
      .row-fluid-slotcontent.collapse{ :id => "transaction-<%= id %>" }
        .span13
          <%= description %>

  -transactions = system.transactions.all
  -if transactions.empty?
    %p Describe sets of transactions generated by this System or Process that an Auditor might audit.

  %ul.tree-structure#transactionsList
    -transactions.each do |item|
      %li{:'data-id' => item.id}
        .item-main
          .openclose{ :class => 'lastchild' }
          .item-title
            .row-fluid
              =render :partial => 'object_leaf', :locals => { :instance => item, :code => '' }
            .item-actions
              %a.widgetbtn.fltrt{ :href => edit_flow_transaction_path(item), :'data-toggle' => 'modal-ajax-form', :'data-modal-reset' => 'reset', :'data-form-target' => 'refresh' }
                %i.grcicon-edit
